<?php $this->load->view('layout/header');?>
<div class="supplier-content-page">
    <div class="product-test-h5">
        <ul class="breadcrumb">
            <li><a href="javascript:;">我的账户</a></li>
            <li class="active"><a href="<?php echo site_url('accountinfo/securitySettings')?>">安全设置</a></li>
            <li>修改密码</li>
        </ul>
        <div class="order-right">
            <div class="pass-frame">
            	<?php echo execute_alert_message();?>
                <ul class="pass-mody clearfix">
                    <li class="active">
                        <span class="pass-hr"></span>
                        <i class="iconfont">&#xe607;</i>
                        <p>验证身份</p>
                    </li>
                    <li>
                        <span class="pass-hr"></span>
                        <i class="iconfont">&#xe605;</i>
                        <p>修改登录密码</p>
                    </li>
                    <li>
                        <span class="pass-hr"></span>
                        <i class="iconfont">&#xe606;</i>
                        <p>完成</p>
                    </li>
                </ul>
                <form class="pass-form form-horizontal public-validate-form" action="<?php echo site_url('validate/modifyPwAction'); ?>" method="post" >
                    <div class="form-group">
                        <label class="col-sm-1 control-label">您的手机号：</label>
                        <div class="col-sm-6 controls clearfix">
                            <p><?php echo subStrMobilePhone($userInfo->mobile_phone); ?></p>
                            <a href="javascript:;" id="get-mobile-phone-captcha" >获取短信验证码</a>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label">手机验证码：</label>
                        <div class="col-sm-6 controls">
                          <input type="text" name="mobilePhoneCaptcha" class="form-control required number">
                        </div>
                    </div>
                    <button type="submit" class="pass-submit">下一步</button>
                </form>
            </div>
        </div>
    </div>    
</div>
<?php $this->load->view('layout/footer');?>
<script type="text/javascript">
    $('.form-horizontal').submit(function(){
        return false;
    }).validate({
        submitHandler: function(f) {
            var obj = $('button[type=submit]')
            $.ajax({
                type: 'post',
                async: true,
                dataType : 'json',
                url: hostUrl() + '/validate/modifyPwAction',
                data: $('form.form-horizontal').serialize(),
                beforeSend: function() {
                    obj.text('正在验证...').attr('disabled', true);
                },
                success: function(data) {
                    if (data.status) {
                        window.location.href = data.msg;
                    } else {
                        layerMessages(data.status, data.msg);
                    }
                    obj.text('重新验证').removeAttr('disabled');
                }
            });
        }
    });
</script>